﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public class Dialog
{
    private bool start;

    private List<NPCDialog> npc;
    private List<PlayerDialog> player;

    public bool Start
    {
        get { return start; }
        set { start = value; }
    }

    public List<NPCDialog> NPCDialog
    {
        get { return npc; }
    }

    public string NPCText
    {
        get
        {
            for (int i = npc.Count - 1; i >= 0; i--)
            {
                if (GameSession.CheckAllConditions(npc[i].Need) || npc[i].Need == null)
                {
                    return npc[i].Text;
                }
            }
            return "";
        }
    }

    public List<PlayerDialog> PlayerDialog 
    {
        get { return player; }
    }

    public Dialog()    
    {
        npc = new List<NPCDialog>();
        player = new List<PlayerDialog>();
    }


}
